package com.geekstudy.week11;

import redis.clients.jedis.JedisPubSub;

import java.util.Arrays;

public class JedisPubSubDemo extends JedisPubSub {

    @Override
    public void onMessage(String channel, String message) {
        super.onMessage(channel, message);
        System.out.println("JedisPubSubDemo onMessage channel:" + channel + "  message:" + message);
    }


    @Override
    public void subscribe(String ... channels) {
        super.subscribe(channels);
        System.out.println("JedisPubSubDemo channels:" + Arrays.toString(channels));
    }

    @Override
    public void onSubscribe(String channel, int subscribedChannels) {
        super.onSubscribe(channel, subscribedChannels);
        System.out.println("JedisPubSubDemo onSubscribe channel:" + channel + "  subscribedChannels:" + subscribedChannels);
    }

}
